#include <stdio.h>

int fac(int m) {
    int i = 0;
    int sum = 1;
    for (i = 1; i <= m; i++) {
        sum = sum * i;
    }
    return sum;
}

int main() {
    int n = 0;
    scanf("%d", &n);
    int ret = fac(n);
    printf("%d\n", ret);
    return 0;
}
